import re
from common.handleconfig import conf
s = '{"mobile_phone":"#mobile_phone#","pwd":"#pwd#"}'

r1 = r"#(.+?)#"

def replace_data(s):
    r1 = r"#(.+?)#"
    while re.search(r1,s):
        res = re.search(r1,s)
        data = res.group()
        key = res.group(1)
        s = s.replace(data,conf.get("test_data",key))
    return s

s = replace_data(s)
print(s)
